package com.eyaomall.wxmall.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.eyaomall.wxmall.dao.ShopDao;
import com.eyaomall.wxmall.model.po.Shop;
import com.eyaomall.wxmall.service.ShopService;
@Service
public class ShopServiceImpl implements ShopService {

	@Autowired
	private ShopDao shopDao;
	
	/**
	 * 根据ID查询店铺信息
	 */
	public Shop queryById(Integer id) {
		
		return shopDao.queryById(id);
	}

	/**
	 * 根据微信号查询店铺信息
	 */
	public Shop queryByWxAppId(String appId) {
		
		return shopDao.queryByAppId(appId);
	}
	
	/**
	 * 根据ID查询店铺信息
	 */
	public Shop queryShop(Integer id) {
		
		return shopDao.queryShop(id);
	}

	/**
	 * 根据id判断是否失效
	 * @param shopId
	 * @return
	 */
	public Shop queryShopInvalid(Integer shopId) {
		return (Shop) shopDao.query("queryShopInvalid", shopId);
	}

}
